'use strict'

const { Controller } = require('egg')
const { mongodbUrl, mongoDbName } = require('../../config/db')
const mongo = require('../../app/utils/mongo')

class ProjectController extends Controller {
  async getTemplate() {
    const { ctx } = this
    const db = await mongo()
    const collection = db.collection('project')
    const res = await collection.find({}).toArray()
    ctx.body = res
  }
}

module.exports = ProjectController
